<template>
	<view class="product pageBg">
		<image class="banner" v-if="productItem.product_img" :src="productItem.product_img[0]" mode=""></image>
		<view class="briefIntroduction spaceBetween">
			<view class="txtbox spaceEvenly">
				<view class="product_name">
					{{ productItem.product_name }}
				</view>
				<view class="product_desc">
					{{ productItem.product_desc }}
				</view>
			</view>
			<view class="opt">
				<view class="item flex right" @click="share">
					<image class="icon" src="/static/images/share.png" mode=""></image>
					<view class="text">分享</view>
				</view>
				<!-- <view class="item flex right" @click="FavoriteEdit">
					<image class="icon" v-show="!productItem.is_favorite || productItem.is_favorite === 0" src="/static/images/collection.png" mode=""></image>
					<image class="icon" v-show="productItem.is_favorite == 1" src="/static/images/collectionAct.png" mode=""></image>
					<view class="txt">收藏</view>
				</view> -->
			</view>
		</view>
		<view class="relatedNetworks">
			<view class="title">相关人脉</view>
			<item  :i="groupDetails"></item>
			
		</view>
	</view>
</template>

<script>
	import item from "@/components/group/list/item/item.vue"
	export default {
		components:{
			item,
		},
		data() {
			return {
				productItem: {},
				groupDetails:{},
			};
		},
		onLoad({ index }) {
			this.groupDetails = uni.getStorageSync('productItem');
			this.productItem = this.groupDetails.product[index];
		},
		methods: {
			share(item){
				uni.setStorageSync('groupDetails', this.groupDetails);
				const url = 'pages/group/details/details?id='+this.groupDetails.id ;
				uni.navigateTo({
					url: '/pages/group/share/share?page=' + url
				});
			},
			FavoriteEdit(){
				
			}
		}
	};
</script>
<style lang="scss" scoped>
	.product {
		.banner {
			width: 100%;
			height: 421rpx;
		}
		.briefIntroduction {
			width: 100%;
			height: 135rpx;
			background: #ffffff;
			align-items: center;
			.txtbox {
				height: 100%;
				flex-direction: column;
				margin-left: 30rpx;
				text-align: left;
				.product_name {
					color: #000000;
					font-size: $uni-font-size-15;
				}
				.product_desc {
					font-size: $uni-font-size-12;
					color: #999999;
				}
			}
			.opt {
				margin-right: $margin-width;
				overflow: hidden;
				.item {
					margin-left: 20rpx;
					color: #000000;
					font-size: $uni-font-size-10;
					flex-direction: column;
					align-items: center;
					.icon {
						width: 30rpx;
						height: 30rpx;
						margin-bottom: 8rpx;
					}
				}
			}
		}
		.relatedNetworks {
			.title {
				margin: $margin-width auto $submargin-width;
				font-weight: bold;
				color: #000000;
				font-size: $uni-font-size-14;
				width: 690rpx;
				
			}
		}
	}
</style>
